package IntegrationTest;

import io.CourseInput;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

import junit.framework.TestCase;
import entities.Course;
import entities.Section;
import entities.Staff;

public class Test_CourseInput_CourseInputProcessor_Section_Staff extends
		TestCase {

	public void setUp() throws FileNotFoundException {
		CourseInput.courseInput = new FileInputStream("CourseInputTest.txt");
	}

	public void test() {
		CourseInput.courseDataFromFile();
		assertEquals(6, Section.getSectionIdList().length);
		assertEquals(2, Staff.getStaffById("AC8").getAllSectionIds().size());
	}

	public void tearDown() {
		Staff.clear();
		Section.clear();
		Course.clear();
	}
}
